<?php 
defined( '_JEXEC' ) or die( 'Restricted access' );
if(!defined('DS')){
	define('DS',DIRECTORY_SEPARATOR);
}
JHtml::_('jquery.framework');
$menu = JSite::getMenu();
$user = JFactory::getUser();

if ($menu->getActive() == $menu->getDefault())
	$main = 'homepage';
if($menu->getActive()->id == 223 || $menu->getActive()->id == 224)
	$main = 'homepage';
else
	$main = 'subpage';

$lang = JFactory::getLanguage();

?>
<!DOCTYPE html>
<html>
	<head>
	  	<meta charset="utf-8" />
	  	<jdoc:include type="head" />
	  	<script type="text/javascript">
			var base_url = "<?php JURI::base(); ?>";
			var JS_ALERT_EMAIL_IS_INVALID = "<?php echo JText::_('JS_ALERT_EMAIL_IS_INVALID'); ?>"
			var JS_ALERT_PASSWORD_EMPTY = "<?php echo JText::_('JS_ALERT_PASSWORD_EMPTY'); ?>"
			var JS_ALERT_THE_SAME_PASSWORD = "<?php echo JText::_('JS_ALERT_THE_SAME_PASSWORD'); ?>"
			var JS_ALERT_PLEASE_TICK_CHECK_BOX = "<?php echo JText::_('JS_ALERT_PLEASE_TICK_CHECK_BOX'); ?>"
			var JS_ALERT_EMAIL_IS_NOT_AVAILABLE = "<?php echo JText::_('JS_ALERT_EMAIL_IS_NOT_AVAILABLE'); ?>"
			var JS_ALERT_LOADING = "loading...";

		</script>
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

  		<link href='http://wmcvip.vn/templates/wrd/favicon.ico' rel='shortcut icon' type='image/vnd.microsoft.icon' />
  		<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,700&subset=latin,vietnamese' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/stylesheets/foundation.css">
  		<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/stylesheets/app.css">
  		<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/stylesheets/metro.css">
  		
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/modernizr.foundation.js"></script>
		
		
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/jquery.easing.1.3.js"></script>
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/jquery.easing.compatibility.js"></script>

		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/foundation.min.js"></script>
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/mosaic.1.0.1.js"></script>
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/foundation-datepicker.js"></script>
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/lazy_loading.js"></script>
		<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascripts/app.js"></script>
		<script src="<?php echo $this->baseurl ?>/media/com_wrd/js/spin/jquery-spin.js"></script>
		<script src="<?php echo $this->baseurl ?>/media/com_wrd/js/number_format.js"></script>
		<script src="<?php echo $this->baseurl ?>/media/com_wrd/js/jquery.cookie.js"></script>
		<script src="<?php echo $this->baseurl ?>/media/com_wrd/js/json_encode.js"></script>
		<script src="<?php echo $this->baseurl ?>/media/com_wrd/js/json_decode.js"></script>

		<script>
			  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

			  ga('create', 'UA-38338567-1', 'wmcvip.vn');
			  ga('require', 'displayfeatures');
			  ga('send', 'pageview');

			//$(window).load(function(){
			//	w = ($(window).width() - 985 )/2;
			//	$(".banner_right").css({width: w});
				//alert($(window).width());
			//});
		</script>
		
		<!--  Code tracking pingdom cua tai khoan wmcvipvietnam.vn@gmail.com -->
		<script>
			var _prum = [['id', '53392b09abe53da6642ef842'],
						 ['mark', 'firstbyte', (new Date()).getTime()]];
			(function() {
				var s = document.getElementsByTagName('script')[0]
				  , p = document.createElement('script');
				p.async = 'async';
				p.src = '//rum-static.pingdom.net/prum.min.js';
				s.parentNode.insertBefore(p, s);
			})();
		</script>	
		
	</head>
	<body>
		<!-- header -->
		<div class="banner">
			<div class="banner_content">
				<div class="row columns banner_lef">
					<div class="row">
						<!--<div class=" columns">-->
						<div class="three columns">
							<a href="index.php"><img style="width: 73%;" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/home.png"></a>
						</div>
						<div class="six columns slogan">
							<?php if($lang->getTag() == 'vi-VN'): ?>
								<img src="images/slogan.png">
							<?php elseif($lang->getTag() == 'en-GB'):?>
								<img src="images/slogan_en.png">
							<?php endif;?>
						</div>
						<div style="text-align: center;" class="three columns 2ndlogo">
							<a href="index.php"><img src="images/wmc-logo.png"></a>
						</div>
					<!--</div>-->
					</div><!-- end div.row -->
					
				</div>
				<div class="banner_right">
					
				</div>
			</div>
		</div>
		<div class="menu-bg">
			<div class="row">
				<div class="twelve columns menu">
					<ul class="nav-bar">
						<?php if($lang->getTag() == 'vi-VN'): ?>
							<li class="about">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=88&Itemid=105'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_ABOUT') ?></a>
						      </li>
							<li class="facilities">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=90&Itemid=105'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_BENEFIT') ?></a></li>
							<li class="promotion">
							    <a href="<?php echo JRoute::_('index.php?option=com_promotions&view=redemptions&Itemid=175'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_REWARDS'); ?></a></li>
							<li class="faq">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=89&Itemid=151'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_CONTACT'); ?></a></li>
						
						<?php elseif($lang->getTag() == 'en-GB'):?>
							<li class="about">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=87&Itemid=105'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_ABOUT') ?></a></li>
							<li class="facilities">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=91&Itemid=105'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_BENEFIT') ?></a></li>
							
							<li class="promotion">
							    <a href="<?php echo JRoute::_('index.php?option=com_promotions&view=redemptions&Itemid=175'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_REWARDS'); ?></a></li>
							<li class="faq">
							    <a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=26&Itemid=151'); ?>">
							        <?php echo JText::_('WMC_TOP_MENU_CONTACT'); ?></a></li>
						
						<?php endif;?>
						<div class="linkMenuRight <?php echo ($user->id) ? "haslogin".$lang->getTag() : "nologin".$lang->getTag(); ?> <?php echo ($lang->getTag() == 'vi-VN') ? 'linkMenuRight_vi' : 'linkMenuRight_en'; ?>" style="">
							<jdoc:include type="modules" name="loginmenu" />
								<a target="_blank" href="https://www.facebook.com/pages/WMC-VIP/312001312265919?ref=hl"><li class="facebook"></li></a>
							<jdoc:include type="modules" name="language" />
						</div>
						
					</ul>
				</div>
			</div>
		</div>
			<!-- login -->
			<jdoc:include type="modules" name="login" />

			<!-- slideshow -->
			<div class="slideshow-bg">
				<div class="row slideshow">
					<div id="featured">
						<?php if($lang->getTag() == 'vi-VN'): ?>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner1vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner2vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner3vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner4vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner5vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner6vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner7vn.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner8vn.jpg" /></a>
					  	<?php elseif($lang->getTag() == 'en-GB'):?>
					  		<a href="#"><img class="lazy" src="images/slideshow/banner1en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner2en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner3en.jpg" /></a>
						 	<a href="#"><img class="lazy" src="images/slideshow/banner4en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner5en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner6en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner7en.jpg" /></a>
						  	<a href="#"><img class="lazy" src="images/slideshow/banner8en.jpg" /></a>
					  	<?php endif;?>
					</div>
				</div>
			</div>
			
			<jdoc:include type="modules" name="slideshow" />
			
			<!-- body -->
			<jdoc:include type="modules" name="metro" />
			<?php if($main == 'subpage'): ?>
			<div class="row">
				<div class="nine columns">
					
					<jdoc:include type="component" />
					<jdoc:include type="modules" name="submetro" />
                </div>
            	
            	<jdoc:include type="modules" name="right" />
					
            	
            	<input type="hidden" name="slug_bad_sub" id="slug_bad_sub" value="1">
            </div>
            <?php endif; ?>

			<!-- pre footer -->
			<div class="row" id="footertitle">
				<div class="twelve columns all_reward_header">	
					<a id="reward" href="<?php echo JRoute::_('index.php?option=com_promotions&view=redemptions&Itemid=175'); ?>"><?php echo JText::_('WRD_HOME_VIEW_ALL_REWARDS') ?></a>
				</div>
			</div>
			<div class="row pre_footer">

				<div class="three columns pre_footer_fisrt_col">
					<jdoc:include type="modules" name="col1" />
				</div>
				
				<div class="three columns pre_footer_second_col">
					<jdoc:include type="modules" name="col2" />
					
				</div>
				
				<div class="three columns pre_footer_third_col">
					<jdoc:include type="modules" name="col3" />
					
				</div>
				<div class="three columns pre_footer_last_col">
					<div class="row">
						
						<div class="twelve columns contact">
							<div class="contact_content">
							    <jdoc:include type="modules" name="contactus" />
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<div class="row">
				<jdoc:include type="modules" name="ads" />
			</div>
			
			<!-- footer -->
			<div class="footer">
				<div class="row footer_content">
					<div class="two columns">
						<div class="row">
							<div class="twelve columns">
								<a class="wmc_group" target="blank" href="http://www.wmcvietnam.com/">&nbsp;</a>
							</div>
							<div class="one columns">
								
							</div>
						</div>
					</div>
					<div class="ten columns">
						<div class="row">
							<div class="row">
								<div class="one columns blank">
									
								</div>
								<div class="two columns amigo">
									<a class="" target="blank" href="http://amigo.wmcvietnam.com">&nbsp;</a>
								</div>
								<div class="two columns ccnh">
									<a class="" target="blank" href="http://cafecentral.wmcvietnam.com">&nbsp;</a>
								</div>
								<div class="two columns ducbao">
									<a class="" target="blank" href="http://www.windsorplazahotel.com/index.php?option=com_content&view=article&id=3&Itemid=3&lang=en">&nbsp;</a>
								</div>
								<div class="two columns kissho">
									<a class="" target="blank" href="http://kissho.wmcvietnam.com">&nbsp;</a>
								</div>
								<div class="three columns sherwood">
									<a class="" target="blank" href="http://www.sherwoodresidence.com">&nbsp;</a>
								</div>
								
							</div>
							<div class="row">
								<div class="one columns ">
									
								</div>
								<div class="two columns ngandinh">
									<a class="" target="blank" href="http://www.windsorplazahotel.com/index.php?option=com_content&view=article&id=3&Itemid=3&lang=en">&nbsp;</a>
								</div>
								<div class="two columns spa">
									<a class="" target="blank" href="http://windsorplazahotel.com/index.php?option=com_content&view=article&id=48&Itemid=64&lang=en">&nbsp;</a>
								</div>
								<div class="two columns windsor">
									<a class="" target="blank" href="http://windsorplazahotel.com/">&nbsp;</a>
								</div>
								<div class="two columns ccad">
									<a class="" target="blank" href="http://www.windsorplazahotel.com/index.php?option=com_content&view=article&id=3&Itemid=3&lang=en">&nbsp;</a>
								</div>
								<div class="two columns tott">
									<a class="" target="blank" href="http://www.windsorplazahotel.com/index.php?option=com_content&view=article&id=3&Itemid=3&lang=en">&nbsp;</a>
								</div>
								
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="manageby">
				<div class="row">
					<div class="twelve columns manageby_content">
						<a class="" href="http://wmcvietnam.com" target="blank" >&nbsp;</a>
					</div>
				</div>
			</div>
				<?php require_once(JPATH_SITE.DS.'templates'.DS.'wmcrewards'.DS.'html'.DS.'message.php');?>
			<div class="blurbg" style="display: none">
		</div>
		
		<div id="point_eff" style=""></div>

	</body>
</html>